package com.example.demo.controller;

import org.springframework.context.support.ClassPathXmlApplicationContext;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;
import java.util.HashMap;

@RestController
public class TestController {
    @RequestMapping("/test")
    public  void test(HttpServletRequest request){
        Object user1 = request.getAttribute("Host");
        System.out.println(user1);
    }

    public static void main(String[] args) {
        HashMap<String, String> map =new HashMap<>();

    }
}
